package nl.project.data;

import java.util.ArrayList;

import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;

public class TestDataGetter {
	
	public TestDataGetter() {	
		DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
		
		Key enrollmentsKey = KeyFactory.createKey("testData", "testEnrollment");
		Entity enrollment = new Entity("enrollment", enrollmentsKey);
//		String[] contact = new String[5];
		ArrayList<String> contact = new ArrayList<String>();
		Object[] preferences = new Object[2];
		boolean[] days = {true, false, true};
		contact.add("wouterdewild@gmail.com");
		contact.add("Hierweg 45");
		contact.add("2699 TY");
		contact.add("Moerkapelle");
		contact.add("045-89656475");
		preferences[0] = days;
		preferences[1] = "Early in the evening";
		enrollment.setProperty("parentId", "23");
		enrollment.setProperty("teacherId", "BACA");
		enrollment.setProperty("studentId", "58");
		enrollment.setProperty("contact", contact);
		enrollment.setProperty("duration", "15");
//		enrollment.setProperty("preferences", preferences);
		datastore.put(enrollment);
		
//		contact[0] = "jeroendendaas@gmail.com";
//		contact[1] = "Daarweg 89";
//		contact[2] = "9856 YU";
//		contact[3] = "Delft";
//		contact[4] = "045-26589754";
//		days[2] = false;
//		preferences[0] = days;
//		preferences[1] = "Later in the evening";
//		enrollment = new Entity("enrollment", enrollmentsKey);
//		enrollment.setProperty("parentId", "97");
//		enrollment.setProperty("teacherId", "KILO");
//		enrollment.setProperty("studentId", "87");
////		enrollment.setProperty("contact", contact);
//		enrollment.setProperty("duration", "15");
////		enrollment.setProperty("preferences", preferences);
//		datastore.put(enrollment);
//		
//		contact[0] = "hahaditiseensukkel@gmail.com";
//		contact[1] = "Boesingel 152";
//		contact[2] = "9862 GH";
//		contact[3] = "Groningen";
//		contact[4] = "986-454841435";
//		days[0] = false;
//		preferences[0] = days;
//		preferences[1] = "Early in the evening";
//		enrollment = new Entity("enrollment", enrollmentsKey);
//		enrollment.setProperty("parentId", "987");
//		enrollment.setProperty("teacherId", "QPA");
//		enrollment.setProperty("studentId", "54");
////		enrollment.setProperty("contact", contact);
//		enrollment.setProperty("duration", "15");
////		enrollment.setProperty("preferences", preferences);
//		datastore.put(enrollment);
		
	}
}